dictD = {"王力宏":80, "周杰伦":58, "林俊杰":65, "王宝强":50,"王思聪":40,"王心凌":99}
# 循环遍历打印所有的名字
# 循环遍历打印所有的分数
# (选做)求考试的平均分
print(dictD.values())
avg_score=sum(dictD.values())/len(dictD.values())
print(avg_score)
print("------------------------------------------")
sum_a=0
for a in dictD.values():
    sum_a+=a
avg=sum_a/len(dictD)

# (选做)循环遍历打印考试成绩及格的名字
for  name,score in dictD.items():
    if score>60:
        print(name,"---->",score)
print("------------------------------------------------------")
for name in dictD:
    if dictD[name]>60:
        print(name,"---->",dictD[name])






